/*    */ package com.zimbra.cs.client.soap;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.DomUtil;
/*    */ import com.zimbra.common.soap.MailConstants;
/*    */ import com.zimbra.cs.client.LmcFolder;
/*    */ import org.dom4j.DocumentHelper;
/*    */ import org.dom4j.Element;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class LmcCreateFolderRequest
/*    */   extends LmcSoapRequest
/*    */ {
/*    */   private String mName;
/*    */   private String mParentID;
/*    */   private String mView;
/*    */   
/*    */   public void setParentID(String id)
/*    */   {
/* 39 */     this.mParentID = id;
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/* 45 */   public void setName(String n) { this.mName = n; }
/*    */   
/* 47 */   public void setView(String n) { this.mView = n; }
/*    */   
/* 49 */   public String getParentID() { return this.mParentID; }
/*    */   
/* 51 */   public String getName() { return this.mName; }
/*    */   
/* 53 */   public String getView() { return this.mView; }
/*    */   
/*    */   protected Element getRequestXML() {
/* 56 */     Element request = DocumentHelper.createElement(MailConstants.CREATE_FOLDER_REQUEST);
/* 57 */     Element f = DomUtil.add(request, "folder", "");
/* 58 */     DomUtil.addAttr(f, "name", this.mName);
/* 59 */     DomUtil.addAttr(f, "l", this.mParentID);
/* 60 */     if (this.mView != null) {
/* 61 */       DomUtil.addAttr(f, "view", this.mView);
/*    */     }
/* 63 */     return request;
/*    */   }
/*    */   
/*    */   protected LmcSoapResponse parseResponseXML(Element responseXML)
/*    */     throws ServiceException
/*    */   {
/* 69 */     Element folderElem = DomUtil.get(responseXML, "folder");
/* 70 */     LmcFolder f = parseFolder(folderElem);
/* 71 */     LmcCreateFolderResponse response = new LmcCreateFolderResponse();
/* 72 */     response.setFolder(f);
/* 73 */     return response;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/client/soap/LmcCreateFolderRequest.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */